package com.guodi.map.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.Date;

/**
* @描述: 通用配图表 实体类
* @作者: 陈宏成
* @日期: 2021-11-12
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("map_general_template")
@ApiModel(value="MapGeneralTemplate对象", description="通用配图表")
public class MapGeneralTemplate implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @Length(max = 32, message = "主键ID最大为32个字符")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "通用配图名")
    @NotBlank(message = "名称不能为空")
    @Length(max = 100, message = "通用配图名最大为100个字符")
    @TableField(value = "name")
    private String name;

    @ApiModelProperty(value = "图层id，多个英文逗号隔开")
    @Length(max = 255, message = "图层id，多个英文逗号隔开最大为255个字符")
    @TableField(value = "layer_ids")
    private String layerIds;

    @ApiModelProperty(value = "缩略图路径")
    @Length(max = 255, message = "缩略图路径最大为255个字符")
    @TableField(value = "thumbnail_path")
    private String thumbnailPath;

    @ApiModelProperty(value = "缩略图BASE64文本")
//    @Length(max = 255, message = "缩略图路径最大为255个字符")
    @TableField(value = "thumbnail_text")
    private String thumbnailText;

    @ApiModelProperty(value = "范围")
    @TableField(value = "extent")
    private String extent;

    @ApiModelProperty(value = "创建人")
    @Length(max = 32, message = "创建人最大为32个字符")
    @TableField(value = "creator", updateStrategy = FieldStrategy.NEVER)
    private String creator;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", updateStrategy = FieldStrategy.NEVER)
    private Date createTime;

    @ApiModelProperty(value = "修改人")
    @Length(max = 32, message = "修改人最大为32个字符")
    @TableField(value = "modifier", insertStrategy = FieldStrategy.NEVER)
    private String modifier;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "modify_time", insertStrategy = FieldStrategy.NEVER)
    private Date modifyTime;


}
